package pri.hillchen.std.design.pattern.factory;

import pri.hillchen.std.design.pattern.factory.entry.Pen;

/**
 * Created by hillchen on 2018/3/5.
 */
public class ConcretePenFactory extends AbstractPenFactory {

    private PenFactory pencilFactory = new PencilFactory();
    private PenFactory ballPenFactory = new BallPenFactory();
    private PenFactory brushPenFactory = new BrushPenFactory();

    public Pen createPencil() {
        return pencilFactory.createPen();
    }

    public Pen createBallPen() {
        return ballPenFactory.createPen();
    }

    public Pen createBrushPen() {
        return brushPenFactory.createPen();
    }
}
